import fetch from './fetch'



export const login = (data) => fetch({
  url: "/auth/loginByPassword",
  method: "post",
  data,
  headers: {
    "Content-Type": "application/json",
  }
})

export const getCode = (data) => fetch({
  url: "/auth/sendCode",
  method: "post",
  data
})


//通过验证码登录
export const loginByCode = (data) => fetch({
  url: "/auth/loginByCode",
  data,
  method: "post"
})


export const setPassWord = (data) => fetch({
  url: "/auth/forget",
  data,
  method: "post"
})
